import superagent from 'superagent';

class Crawler {
    private url = `http://toscrape.com/`;
    constructor() {
        this.getComposition();
    }
    // 爬取html
    async getComposition() {
       const respRet = await superagent.get(this.url);
       const respHtml = respRet.text;
       console.log(respHtml);
    }
}

const c1 = new Crawler();